package com.sanjiahantang.youjiaclient.module.match.adapters;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.LayoutRes;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.sanjiahantang.uilibrary.adapter.recyclerview.BaseAdapterHelper;
import com.sanjiahantang.uilibrary.adapter.recyclerview.QuickAdapter;
import com.sanjiahantang.youjiaclient.R;
import com.sanjiahantang.youjiaclient.config.ConfigValue;
import com.sanjiahantang.youjiaclient.module.common.adapters.ShopAdapter;
import com.sanjiahantang.youjiaclient.module.common.holders.ShopHolder;
import com.sanjiahantang.youjiaclient.module.goods.views.impl.GoodsDetailActivity;
import com.sanjiahantang.youjiaclient.module.match.beans.MatchBean;
import com.sanjiahantang.youjiaclient.module.match.beans.MatchListBean;
import com.squareup.picasso.Picasso;

import net.lucode.hackware.magicindicator.MagicIndicator;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.CommonPagerTitleView;

/**
 * Created by zy on 2017/10/17.
 */

public class MatchListAdapter extends RecyclerView.Adapter{

    private MatchListBean.Data data;
    private Context context;
    private LayoutInflater inflater;
    public MatchListAdapter(Context context, MatchListBean.Data data) {
        super();
        this.context = context;
        this.data = data;
        this.inflater = LayoutInflater.from(context);
    }

    @Override
    public int getItemCount() {
        return ( data == null || data.getList() == null ) ? 0 : data.getList().size();
    }


    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        return new ShopHolder((Activity) context,inflater.inflate(R.layout.item_match, null),
                ShopAdapter.TYPE_COLLOCATION,data.getList().get(viewType));
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemViewType(int position) {
        return position;
    }


}
